package responsibilitychain.example;

/**
 * @author Chen Guang
 * @date 2019/4/23 0023 上午 10:07
 */
public abstract class Manager {

    private Manager superior;
    private String name;

    public Manager(String name) {
        this.name = name;
    }

    /**
     * 设置下一任
     * @param superior Manager
     */
    public void setSuperior(Manager superior){
        this.superior = superior;
    }

    protected Manager getSuperior(){
        return this.superior;
    }

    /**
     * 申请请求
     * @param request request
     */
    public abstract void requestApplications(Request request);
}
